using System;
using System.Linq;
using SapaFinance.Domain.Model;
using SapaFinance.GenericRepository;

namespace SapaFinance.Domain
{
    public interface IRequestSpecification : ISpecification<Request>
    {
        IRequestSpecification OrderByPaymentPeriod();
	
    }
    public class RequestQueryableSpecification
        : QueryableSpecification<Request>
          , IRequestSpecification
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        public RequestQueryableSpecification(IUnitOfWorkConvertor unitOfWorkConvertor)
            : base(unitOfWorkConvertor)
        {
        }

        public IRequestSpecification OrderByPaymentPeriod()
        {
            this.Queryable = this.Queryable.OrderBy(c => c.PaymentPeriod);
            return this;
        }



    }
}